package com.huangsm.book.designmodel.jvm;

/**
 * 测试永久区饱和(包含常量池和类的元数据)
 * JVM参数:-XX:PermSize=2M -XX:MaxPermSize=4M -XX:+PrintGCDetails
 * @author huang
 * @date 2019/2/22
 */
public class PermanentDemo {
    public static void main(String[] args) {
        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            String intern = String.valueOf(i).intern();//加入常量池
        }
    }
}
